#include"main.hpp"

void normalser()
{
	char nm[MAX],id[MAX];bool found=false;
	student stu[MAX];
	FILE *stufile;
	if((stufile = fopen ("stugrd.txt", "rb"))==NULL)
    {
        printf("出现错误，代码：FILEERROR");
    }
    fread(stu,sizeof(struct student),MAX,stufile);
	printf("请输入学生姓名：\n");
	scanf("%s",nm);
	printf("请输入学生id:\n");
	scanf("%s",id);
	for(int i=0;i<=MAX;i++)
	{
		if(strcmp(nm,stu[i].nm)==0 && strcmp(id,stu[i].id)==0)
		{
			printgrd(stu[i]);
			found=true;
			i=1001;
			break;
		}
	}
	if(found!=true)
	{
		printf("该学生不存在！\n");
	    printf("将返回主菜单\n");
	}
}
